package com.ycw;

import lombok.Data;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;

/**
 * @author gonghl
 * @date 2019-09-10
 */

public class ZookeeperWatcher implements Watcher {

    private ZooKeeper zooKeeper;

    public void setZooKeeper(ZooKeeper zooKeeper) {
        this.zooKeeper = zooKeeper;
    }

    @Override
    public void process(WatchedEvent event) {
        System.out.println(event);
//        zooKeeper.register(this);
    }
}
